<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page isELIgnored='false'%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="conversation.css" rel="STYLESHEET" type="text/css">
<title>Conversation List</title>
<jsp:include page="scripts/js_tools.jsp" />
</head>
<body>
<!--        Header         -->
<jsp:include page="scripts/headerEdit.jsp">
<jsp:param name="title" value="Annotation History" />
</jsp:include>
<!--        List           -->
<div id="recent_sessions" class="list">
<h3>Recent Sessions</h3>
<table>
  <tr>
    <th>User</th>
    <th>From</th>
    <th>To</th>
    <th>Duration</th>
  </tr>
  <c:forEach items="${anno_sessions}" var="anno_session">
    <tr>
    <td><c:out value="${anno_session.user.userName}" /></td>
      <td><c:out value="${anno_session.startDateTimeString}" /></td>
      <td><c:out value="${anno_session.endDateTimeString}" /></td>
      <td><c:out value="${anno_session.durationString}" /></td>
    </tr>
  </c:forEach>
</table>
</div>
<div id="session_summary" class="list">
<h3>Session Summary</h3>
<table>
  <tr>
    <th>User</th>
    <th>From</th>
    <th>To</th>
    <th># Sessions</th>
    <th>Total Duration</th>
  </tr>
  <c:forEach items="${anno_session_stats}" var="stat">
    <c:if test="${stat.numOfSessions > 0}">
    <tr>
    <td><c:out value="${stat.user.userName}" /></td>
      <td><c:out value="${stat.startDateString}" /></td>
      <td><c:out value="${stat.endDateString}" /></td>
      <td><c:out value="${stat.numOfSessions}" /></td>
      <td><c:out value="${stat.totalDurationString}" /></td>
    </tr>
    </c:if>
  </c:forEach>
</table>
<jsp:include page="scripts/footer.jsp" />
</body>
</html>
